package com.tjetc.dao.impl;

import com.tjetc.dao.AdminDao;
import com.tjetc.pojo.entity.Admin;
import com.tjetc.utils.DruidUtils;
import org.apache.commons.dbutils.handlers.BeanHandler;

import java.sql.SQLException;

/**
 * @Author: itda
 * @Date: 2024/5/9 16:49
 * @Description: AdminDaoImpl
 */
public class AdminDaoImpl implements AdminDao {
    @Override
    public Admin getByName(String name) throws SQLException {
        return DruidUtils.r2.query("select * from admin where name = ?", new BeanHandler<>(Admin.class), name);
    }
}
